package com.hospital.doctor.controller;

import com.hospital.common.result.R;
import com.hospital.doctor.domain.ReserveInfo;
import com.hospital.doctor.domain.vo.ReserveInfoVo;
import com.hospital.doctor.service.EltReserveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：zhuzhujiang
 * @Description:
 * @name：EltReverseController
 * @Date：2024/10/17 17:24
 */
@RestController
@RequestMapping("/reserve")
public class EltReserveController {

    @Autowired
    private EltReserveService eltReserveService;


    /**
     * 医生设置预约参数
     * @param rserveInfoVo
     * @return
     */
    @PostMapping("/setReverseCount")
    public R setReverseCount(ReserveInfoVo rserveInfoVo) {
        eltReserveService.setReverseCount(rserveInfoVo);
        return R.success();
    }


    /**
     * 查询医生已经预约的日期
     */
    @PostMapping("/getReserveDate")
    public R getReserveDate(Long doctorId, Long departmentId) {

        List<ReserveInfo> list = eltReserveService.getReserveDate(doctorId, departmentId);

        return R.success(list);
    }


}
